Skip to content

Conversation

@shoummu1
Copy link
Collaborator

@shoummu1 shoummu1 commented Oct 31, 2025

📌 Summary

Adds application/x-www-form-urlencoded content-type support to the gateway testing interface, enabling proper testing of OAuth2 token endpoints.

OAuth2 token endpoints require application/x-www-form-urlencoded requests. Current implementation only supports JSON, making OAuth2 testing impossible via admin UI.

🔗 Related Issue

Closes: #1111

📐 Changes

  • Backend: Add content-type detection in /admin/gateways/test endpoint
  • Schema: Add content_type field to GatewayTestRequest (default: application/json)
  • UI: Add content-type dropdown to gateway test modal
  • JS: Dynamic label updates based on content-type selection

🧪 Testing

  • ✅ Unit tests for form-urlencoded handling
  • ✅ Integration tests for both content types
  • ✅ Manual testing with OAuth2 endpoints

✅ Checklist

  • Code formatted (make black isort pre-commit)
  • Fully backward compatible - defaults to application/json

@shoummu1 shoummu1 marked this pull request as ready for review October 31, 2025 12:31
shoummu1 and others added 4 commits November 4, 2025 23:01
Signed-off-by: Shoumi <shoumimukherjee@gmail.com>
Signed-off-by: Shoumi <shoumimukherjee@gmail.com>
Signed-off-by: Shoumi <shoumimukherjee@gmail.com>
Apply black and trailing-whitespace fixes after rebase.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
@crivetimihai crivetimihai force-pushed the feat/gw-test-form-urlencoded branch from 8ee870f to a1dd426 Compare November 4, 2025 23:06
@crivetimihai crivetimihai merged commit d8067f0 into main Nov 4, 2025
45 checks passed
@crivetimihai crivetimihai deleted the feat/gw-test-form-urlencoded branch November 4, 2025 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Support application/x-www-form-urlencoded Requests in MCP Gateway UI for OAuth2 / Keycloak Integration

3 participants